<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>个人信息页面</title>
    <script type="text/javascript" src="/js/jquery-1.11.1.js"></script>
    <style>
        span{
            color: #1EABFF;
            padding: 0 5px;
        }
    </style>
</head>
<body>
    <h1>用户的个人信息</h1>
    <form id="myForm">
        <h4>adminId:<span id="adminId"></span></h4>
        <h4>loginName:<span id="loginName"></span></h4>
        <h4>petName:<span id="petName"></span></h4>
        <h4>adminPwd:<span id="adminPwd"></span></h4>
        <h4>phone:<span id="phone"></span></h4>
        <h4>headImg:<span id="headImg"></span></h4>
        <h4>role:<span id="role"></span></h4>
        <h4>lastLoginTime:<span id="lastLoginTime"></span></h4>
        <h4>status:<span id="status"></span></h4>
    </form>
</body>
    <script>
        $(function () {
            $.ajax({
                type: "GET",
                url: "/admin/infos" , //RESTful风格的API定义
                data: "",
                success: function (vo) {
                    alert("进来显示用户信息的页面了！")
                    var admins = vo.obj;
                    $("#adminId").html(admins.adminId);
                    $("#loginName").html(admins.loginName);
                    $("#petName").html(admins.petName);
                    $("#adminPwd").html(admins.adminPwd);
                    $("#phone").html(admins.phone);
                    $("#role").html(admins.adminrole.roleName);
                    $("#lastLoginTime").html(admins.lastLoginTime);
                    var sta = admins.status;
                    if (sta==0){
                        $("#status").html("离职");
                    }else if (sta==1){
                        $("#status").html("在职");
                    }else{
                        $("#status").html("休假");
                    }
                }
            });
        });
    </script>
</html>